from spirems import Publisher, def_msg
import time

pub = Publisher('/topic/hello', 'std_msgs::String')
while True:
    msg = def_msg('std_msgs::String')
    msg['data'] = 'hello world!'
    pub.publish(msg)
    time.sleep(1)
